<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>忘记密码 - Surreal Gallery 超现实主义数字藏品平台</title>
    <!-- 引入Font Awesome 6.4.0图标库 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        /* 继承首页样式变量 */
        :root {
            --primary: #6a11cb;
            --secondary: #2575fc;
            --accent: #ff2e63;
            --dark: #1a1a2e;
            --light: #f0f0f0;
            --surreal-purple: #8a2be2;
            --surreal-blue: #00b4d8;
            --surreal-pink: #ff6b6b;
            --surreal-green: #2ecc71;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background: linear-gradient(135deg, var(--dark) 0%, #16213e 100%);
            color: var(--light);
            overflow-x: hidden;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* 超现实主义背景元素 */
        .floating-elements {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: -1;
        }

        .floating-element {
            position: absolute;
            border-radius: 50%;
            opacity: 0.1;
            filter: blur(40px);
            animation: float 15s infinite ease-in-out;
        }

        .floating-element:nth-child(1) {
            width: 300px;
            height: 300px;
            background: var(--surreal-purple);
            top: 10%;
            left: 5%;
            animation-delay: 0s;
        }

        .floating-element:nth-child(2) {
            width: 200px;
            height: 200px;
            background: var(--surreal-blue);
            top: 60%;
            right: 10%;
            animation-delay: 3s;
        }

        .floating-element:nth-child(3) {
            width: 250px;
            height: 250px;
            background: var(--surreal-pink);
            bottom: 10%;
            left: 20%;
            animation-delay: 6s;
        }

        @keyframes float {

            0%,
            100% {
                transform: translateY(0) rotate(0deg);
            }

            50% {
                transform: translateY(-20px) rotate(180deg);
            }
        }

        /* 导航栏 */
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 5%;
            position: fixed;
            width: 100%;
            z-index: 1000;
            background: rgba(26, 26, 46, 0.8);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .logo {
            font-size: 28px;
            font-weight: 700;
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            text-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
        }

        nav ul {
            display: flex;
            list-style: none;
        }

        nav ul li {
            margin-left: 30px;
        }

        nav ul li a {
            color: var(--light);
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            position: relative;
        }

        nav ul li a:hover {
            color: var(--surreal-pink);
        }

        nav ul li a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -5px;
            left: 0;
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue));
            transition: width 0.3s ease;
        }

        nav ul li a:hover::after {
            width: 100%;
        }

        .cta-button {
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue));
            color: white;
            border: none;
            padding: 10px 25px;
            border-radius: 30px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(106, 17, 203, 0.4);
        }

        .cta-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(106, 17, 203, 0.6);
        }

        /* 页面标题区域 */
        .page-header {
            padding: 150px 5% 80px;
            text-align: center;
            position: relative;
        }

        .page-title {
            font-size: 3.5rem;
            margin-bottom: 20px;
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue), var(--surreal-pink));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            line-height: 1.2;
        }

        .page-subtitle {
            font-size: 1.2rem;
            max-width: 600px;
            margin: 0 auto;
            opacity: 0.8;
            line-height: 1.6;
        }

        /* 忘记密码容器 */
        .forgot-container {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-grow: 1;
            padding: 0 5% 100px;
        }

        /* 忘记密码表单 */
        .forgot-form-container {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 20px;
            padding: 40px;
            width: 100%;
            max-width: 500px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
        }

        .forgot-form-container:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        }

        .forgot-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .forgot-icon {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue));
            margin: 0 auto 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2.5rem;
            color: white;
        }

        .forgot-title {
            font-size: 2rem;
            margin-bottom: 10px;
            color: var(--light);
        }

        .forgot-subtitle {
            opacity: 0.7;
            font-size: 1rem;
            line-height: 1.5;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            font-size: 0.9rem;
        }

        .input-with-icon {
            position: relative;
        }

        .form-input {
            width: 100%;
            padding: 12px 15px 12px 45px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(255, 255, 255, 0.05);
            color: var(--light);
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--surreal-purple);
            box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
        }

        .input-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 1.2rem;
            opacity: 0.7;
        }

        .reset-button {
            width: 100%;
            padding: 15px;
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue));
            color: white;
            border: none;
            border-radius: 30px;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-bottom: 20px;
        }

        .reset-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(106, 17, 203, 0.6);
        }

        .reset-button:disabled {
            background: rgba(255, 255, 255, 0.1);
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .back-to-login {
            text-align: center;
            font-size: 0.9rem;
            opacity: 0.8;
            margin-top: 20px;
        }

        .back-to-login a {
            color: var(--surreal-blue);
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .back-to-login a:hover {
            color: var(--surreal-pink);
        }

        /* 重置步骤指示器 */
        .reset-steps {
            display: flex;
            justify-content: space-between;
            margin-bottom: 30px;
            position: relative;
        }

        .reset-steps::before {
            content: '';
            position: absolute;
            top: 15px;
            left: 0;
            width: 100%;
            height: 2px;
            background: rgba(255, 255, 255, 0.1);
            z-index: 1;
        }

        .step {
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            z-index: 2;
        }

        .step-circle {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            margin-bottom: 10px;
            transition: all 0.3s ease;
        }

        .step.active .step-circle {
            background: linear-gradient(45deg, var(--surreal-purple), var(--surreal-blue));
            color: white;
        }

        .step.completed .step-circle {
            background: var(--surreal-green);
            color: white;
        }

        .step.completed .step-circle::after {
            content: '\f00c';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
        }

        .step-label {
            font-size: 0.8rem;
            opacity: 0.7;
        }

        .step.active .step-label {
            opacity: 1;
            color: var(--surreal-blue);
        }

        /* 重置表单步骤 */
        .reset-step {
            display: none;
        }

        .reset-step.active {
            display: block;
            animation: fadeIn 0.5s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* 成功消息 */
        .success-message {
            text-align: center;
            padding: 30px;
            display: none;
        }

        .success-icon {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: var(--surreal-green);
            margin: 0 auto 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2.5rem;
            color: white;
        }

        .success-title {
            font-size: 1.5rem;
            margin-bottom: 10px;
            color: var(--surreal-green);
        }

        /* 页脚 */
        footer {
            background: rgba(0, 0, 0, 0.5);
            padding: 50px 5% 20px;
            margin-top: auto;
        }

        .footer-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 40px;
            margin-bottom: 40px;
        }

        .footer-column h3 {
            font-size: 1.2rem;
            margin-bottom: 20px;
            color: var(--surreal-blue);
        }

        .footer-column ul {
            list-style: none;
        }

        .footer-column ul li {
            margin-bottom: 10px;
        }

        .footer-column ul li a {
            color: var(--light);
            text-decoration: none;
            opacity: 0.7;
            transition: all 0.3s ease;
        }

        .footer-column ul li a:hover {
            opacity: 1;
            color: var(--surreal-pink);
        }

        .social-links {
            display: flex;
            gap: 15px;
            margin-top: 20px;
        }

        .social-link {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .social-link:hover {
            background: var(--surreal-purple);
            transform: translateY(-3px);
        }

        .social-links a {
            text-decoration: none;
            color: #fff;
        }

        .copyright {
            text-align: center;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            opacity: 0.7;
        }

        /* 响应式设计 */
        @media (max-width: 968px) {
            .page-title {
                font-size: 2.8rem;
            }
        }

        @media (max-width: 768px) {
            nav ul {
                display: none;
            }

            .page-header {
                padding: 130px 5% 60px;
            }

            .page-title {
                font-size: 2.2rem;
            }

            .forgot-form-container {
                padding: 30px 20px;
            }

            .reset-steps {
                flex-direction: column;
                gap: 20px;
                align-items: flex-start;
            }

            .reset-steps::before {
                display: none;
            }

            .step {
                flex-direction: row;
                gap: 15px;
            }

            .step-label {
                font-size: 0.9rem;
            }
        }
    </style>
</head>

<body>
    <!-- 超现实主义背景元素 -->
    <div class="floating-elements">
        <div class="floating-element"></div>
        <div class="floating-element"></div>
        <div class="floating-element"></div>
    </div>

    <!-- 导航栏 -->
    <header>
        <div class="logo">Surreal Gallery</div>
        <nav>
            <ul>
                <li><a href="index.html">首页</a></li>
                <li><a href="collections.html">数字藏品</a></li>
                <li><a href="artists.html">艺术家</a></li>
                <li><a href="news.html">新闻动态</a></li>
                <li><a href="#faq">常见问题</a></li>
            </ul>
        </nav>
        <button class="cta-button">连接钱包</button>
    </header>

    <!-- 页面标题区域 -->
    <section class="page-header">
        <h1 class="page-title">忘记密码</h1>
        <p class="page-subtitle">重置您的账户密码，重新访问您的超现实主义数字艺术收藏</p>
    </section>

    <!-- 忘记密码容器 -->
    <section class="forgot-container">
        <div class="forgot-form-container">
            <div class="forgot-header">
                <div class="forgot-icon">
                    <i class="fas fa-key"></i>
                </div>
                <h2 class="forgot-title">重置密码</h2>
                <p class="forgot-subtitle">请按照以下步骤重置您的账户密码</p>
            </div>

            <!-- 重置步骤指示器 -->
            <div class="reset-steps">
                <div class="step active" id="step1">
                    <div class="step-circle">1</div>
                    <span class="step-label">验证邮箱</span>
                </div>
                <div class="step" id="step2">
                    <div class="step-circle">2</div>
                    <span class="step-label">重置密码</span>
                </div>
                <div class="step" id="step3">
                    <div class="step-circle">3</div>
                    <span class="step-label">完成</span>
                </div>
            </div>

            <!-- 步骤1：验证邮箱 -->
            <div class="reset-step active" id="step1-form">
                <form id="emailForm">
                    <div class="form-group">
                        <label class="form-label" for="email">电子邮箱</label>
                        <div class="input-with-icon">
                            <i class="fas fa-envelope input-icon"></i>
                            <input type="email" id="email" class="form-input" placeholder="请输入您注册时使用的电子邮箱" required>
                        </div>
                    </div>
                    <button type="submit" class="reset-button" id="sendCodeBtn">发送验证码</button>
                </form>
                <div class="back-to-login">
                    <a href="login.html"><i class="fas fa-arrow-left"></i> 返回登录</a>
                </div>
            </div>

            <!-- 步骤2：重置密码 -->
            <div class="reset-step" id="step2-form">
                <form id="resetForm">
                    <div class="form-group">
                        <label class="form-label" for="verificationCode">验证码</label>
                        <div class="input-with-icon">
                            <i class="fas fa-shield-alt input-icon"></i>
                            <input type="text" id="verificationCode" class="form-input" placeholder="请输入收到的验证码"
                                required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="newPassword">新密码</label>
                        <div class="input-with-icon">
                            <i class="fas fa-lock input-icon"></i>
                            <input type="password" id="newPassword" class="form-input" placeholder="请输入新密码" required>
                        </div>
                        <div id="passwordStrength" class="password-strength"></div>
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="confirmNewPassword">确认新密码</label>
                        <div class="input-with-icon">
                            <i class="fas fa-lock input-icon"></i>
                            <input type="password" id="confirmNewPassword" class="form-input" placeholder="请再次输入新密码"
                                required>
                        </div>
                        <div id="passwordMatch" class="password-strength"></div>
                    </div>
                    <button type="submit" class="reset-button" id="resetPasswordBtn">重置密码</button>
                </form>
                <div class="back-to-login">
                    <a href="login.html"><i class="fas fa-arrow-left"></i> 返回登录</a>
                </div>
            </div>

            <!-- 步骤3：完成 -->
            <div class="reset-step" id="step3-form">
                <div class="success-message">
                    <div class="success-icon">
                        <i class="fas fa-check"></i>
                    </div>
                    <h3 class="success-title">密码重置成功！</h3>
                    <p>您的密码已成功重置。您现在可以使用新密码登录您的账户。</p>
                    <button class="reset-button" onclick="window.location.href='login.html'" style="margin-top: 20px;">
                        <i class="fas fa-sign-in-alt"></i> 前往登录
                    </button>
                </div>
            </div>
        </div>
    </section>

    <!-- 页脚 -->
    <footer>
        <div class="footer-content">
            <div class="footer-column">
                <h3>Surreal Gallery</h3>
                <p>探索超现实数字艺术的新维度，发现独一无二的数字藏品。</p>
                <div class="social-links">
                    <a href="#" class="social-link"><i class="fab fa-facebook-f"></i></a>
                    <a href="#" class="social-link"><i class="fab fa-twitter"></i></a>
                    <a href="#" class="social-link"><i class="fab fa-instagram"></i></a>
                    <a href="#" class="social-link"><i class="fab fa-weixin"></i></a>
                </div>
            </div>
            <div class="footer-column">
                <h3>快速链接</h3>
                <ul>
                    <li><a href="index.html">首页</a></li>
                    <li><a href="collections.html">数字藏品</a></li>
                    <li><a href="artists.html">艺术家</a></li>
                    <li><a href="news.html">新闻动态</a></li>
                </ul>
            </div>
            <div class="footer-column">
                <h3>支持</h3>
                <ul>
                    <li><a href="#"><i class="fas fa-question-circle"></i> 帮助中心</a></li>
                    <li><a href="#"><i class="fas fa-envelope"></i> 联系我们</a></li>
                    <li><a href="#"><i class="fas fa-users"></i> 社区指南</a></li>
                    <li><a href="#"><i class="fas fa-file-alt"></i> 服务条款</a></li>
                </ul>
            </div>
            <div class="footer-column">
                <h3>订阅更新</h3>
                <p>订阅我们的新闻通讯，获取最新藏品和活动信息。</p>
                <form>
                    <input type="email" placeholder="您的电子邮箱"
                        style="width: 100%; padding: 10px; margin: 10px 0; border-radius: 5px; border: none; background: rgba(255,255,255,0.1); color: white;">
                    <button type="submit" class="cta-button" style="width: 100%;">订阅</button>
                </form>
            </div>
        </div>
        <div class="copyright">
            <p>&copy; 2023 Surreal Gallery. 保留所有权利。</p>
        </div>
    </footer>

    <script>
        // 当前步骤
        let currentStep = 1;
        let verificationCode = '';
        let countdown = 0;
        let countdownInterval;

        // 表单验证和提交
        document.getElementById('emailForm').addEventListener('submit', function (e) {
            e.preventDefault();

            const email = document.getElementById('email').value;

            // 简单的表单验证
            if (!email) {
                showNotification('请输入电子邮箱地址', 'error');
                return;
            }

            if (!validateEmail(email)) {
                showNotification('请输入有效的电子邮箱地址', 'error');
                return;
            }

            // 模拟发送验证码
            showNotification('验证码发送中...', 'info');

            // 生成随机验证码（实际应用中应由后端生成）
            verificationCode = Math.floor(100000 + Math.random() * 900000).toString();

            // 禁用发送按钮并开始倒计时
            const sendCodeBtn = document.getElementById('sendCodeBtn');
            sendCodeBtn.disabled = true;
            countdown = 60;

            countdownInterval = setInterval(() => {
                countdown--;
                sendCodeBtn.textContent = `重新发送(${countdown}s)`;

                if (countdown <= 0) {
                    clearInterval(countdownInterval);
                    sendCodeBtn.disabled = false;
                    sendCodeBtn.textContent = '发送验证码';
                }
            }, 1000);

            // 模拟发送过程
            setTimeout(() => {
                showNotification(`验证码已发送至 ${email}（演示代码：${verificationCode}）`, 'success');
                goToStep(2);
            }, 1500);
        });

        // 重置密码表单提交
        document.getElementById('resetForm').addEventListener('submit', function (e) {
            e.preventDefault();

            const code = document.getElementById('verificationCode').value;
            const newPassword = document.getElementById('newPassword').value;
            const confirmNewPassword = document.getElementById('confirmNewPassword').value;

            // 简单的表单验证
            if (!code) {
                showNotification('请输入验证码', 'error');
                return;
            }

            if (code !== verificationCode) {
                showNotification('验证码不正确', 'error');
                return;
            }

            if (!newPassword || !confirmNewPassword) {
                showNotification('请填写所有必填字段', 'error');
                return;
            }

            if (newPassword !== confirmNewPassword) {
                showNotification('两次输入的密码不一致', 'error');
                return;
            }

            if (newPassword.length < 8) {
                showNotification('密码长度至少为8个字符', 'error');
                return;
            }

            // 模拟重置过程
            showNotification('正在重置密码...', 'info');

            setTimeout(() => {
                showNotification('密码重置成功！', 'success');
                goToStep(3);
            }, 1500);
        });

        // 邮箱验证函数
        function validateEmail(email) {
            const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
            return re.test(email);
        }

        // 密码强度检查
        document.getElementById('newPassword').addEventListener('input', function () {
            const password = this.value;
            const strengthIndicator = document.getElementById('passwordStrength');

            if (password.length === 0) {
                strengthIndicator.textContent = '';
                strengthIndicator.className = 'password-strength';
                return;
            }

            let strength = 0;
            let text = '';
            let className = '';

            // 检查密码长度
            if (password.length >= 8) strength++;

            // 检查是否包含小写字母
            if (/[a-z]/.test(password)) strength++;

            // 检查是否包含大写字母
            if (/[A-Z]/.test(password)) strength++;

            // 检查是否包含数字
            if (/[0-9]/.test(password)) strength++;

            // 检查是否包含特殊字符
            if (/[^A-Za-z0-9]/.test(password)) strength++;

            // 根据强度设置显示文本和样式
            if (strength <= 2) {
                text = '密码强度：弱';
                className = 'password-strength weak';
            } else if (strength <= 4) {
                text = '密码强度：中等';
                className = 'password-strength medium';
            } else {
                text = '密码强度：强';
                className = 'password-strength strong';
            }

            strengthIndicator.textContent = text;
            strengthIndicator.className = className;
        });

        // 密码匹配检查
        document.getElementById('confirmNewPassword').addEventListener('input', function () {
            const password = document.getElementById('newPassword').value;
            const confirmPassword = this.value;
            const matchIndicator = document.getElementById('passwordMatch');

            if (confirmPassword.length === 0) {
                matchIndicator.textContent = '';
                matchIndicator.className = 'password-strength';
                return;
            }

            if (password === confirmPassword) {
                matchIndicator.textContent = '密码匹配';
                matchIndicator.className = 'password-strength strong';
            } else {
                matchIndicator.textContent = '密码不匹配';
                matchIndicator.className = 'password-strength weak';
            }
        });

        // 步骤切换函数
        function goToStep(step) {
            // 隐藏所有步骤
            document.querySelectorAll('.reset-step').forEach(stepEl => {
                stepEl.classList.remove('active');
            });

            // 重置步骤指示器
            document.querySelectorAll('.step').forEach(stepEl => {
                stepEl.classList.remove('active', 'completed');
            });

            // 显示当前步骤
            document.getElementById(`step${step}-form`).classList.add('active');

            // 更新步骤指示器
            for (let i = 1; i <= step; i++) {
                if (i < step) {
                    document.getElementById(`step${i}`).classList.add('completed');
                } else {
                    document.getElementById(`step${i}`).classList.add('active');
                }
            }

            currentStep = step;
        }

        // 显示通知函数
        function showNotification(message, type) {
            // 创建通知元素
            const notification = document.createElement('div');
            notification.style.cssText = `
                position: fixed;
                top: 100px;
                right: 20px;
                background: ${type === 'error' ? 'var(--surreal-pink)' : type === 'success' ? 'var(--surreal-green)' : 'var(--surreal-blue)'};
                color: white;
                padding: 15px 25px;
                border-radius: 10px;
                box-shadow: 0 5px 15px rgba(0,0,0,0.3);
                z-index: 10000;
                transform: translateX(150%);
                transition: transform 0.3s ease;
                max-width: 300px;
            `;
            notification.textContent = message;

            document.body.appendChild(notification);

            // 显示通知
            setTimeout(() => {
                notification.style.transform = 'translateX(0)';
            }, 100);

            // 3秒后隐藏并移除通知
            setTimeout(() => {
                notification.style.transform = 'translateX(150%)';
                setTimeout(() => {
                    document.body.removeChild(notification);
                }, 300);
            }, 3000);
        }

        // 平滑滚动
        document.querySelectorAll('nav a').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                if (this.getAttribute('href').startsWith('#')) {
                    e.preventDefault();

                    const targetId = this.getAttribute('href');
                    const targetElement = document.querySelector(targetId);

                    if (targetElement) {
                        window.scrollTo({
                            top: targetElement.offsetTop - 80,
                            behavior: 'smooth'
                        });
                    }
                }
            });
        });
    </script>
</body>

</html>